package com.qianyu.core.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qianyu.core.entity.base.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "租号请求dto")
public class QqRentOrderDto {

    @Data
    @ApiModel(value = "QqRentOrderDto&RentDto")
    public static class RentDto {

        @NotNull(message = "账号数量不能为空")
        @ApiModelProperty(value = "账号数量", required = true)
        private Integer accountNum;


        @NotNull(message = "租用天数不能为空")
        @ApiModelProperty(value = "租用天数", required = true)
        private Integer day;
    }

    @Data
    @ApiModel(value = "QqRentOrderDto&RentContinueDto")
    public static class RentContinueDto extends RentDto{

        @NotNull(message = "账号数量不能为空")
        @ApiModelProperty(value = "账号数量", required = true)
        private List<Long> orderIds;
    }

    @Data
    @ApiModel(value = "QqRentOrderDto&RentOrderPageDto")
    public static class RentOrderPageDto extends PageDTO {

        @ApiModelProperty(value = "起始时间")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date startTime;


        @ApiModelProperty(value = "结束时间")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date endTime;

        /**
         * 订单状态:0=待处理,1=处理中,2=处理完成,3=没有余号
         */
        @ApiModelProperty("订单状态:0=待处理,1=处理中,2=处理完成,3=没有余号")
        private Integer status;

        /**
         * 订单类型:0=初单,1=续费
         */
        @ApiModelProperty("订单类型:0=初单,1=续费")
        private Integer type;
    }
}
